

macro(set_clr_propreties tgt)
    set_target_properties(${tgt} PROPERTIES 
        VS_GLOBAL_CLRSupport "true"
        COMMON_LANGUAGE_RUNTIME ""
        COMPILE_FLAGS "/EHa"
        DOTNET_TARGET_FRAMEWORK_VERSION "v4.5")

    set_property(TARGET ${tgt} PROPERTY 
        VS_DOTNET_REFERENCES "System" "mscorlib" "System.Data" "System.Drawing" "System.Windows.Forms")
        # Note: Modification of compiler flags is required for CLR compatibility now that we are using .resx files.
        string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
        string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endmacro()

